<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%--
  Created by IntelliJ IDEA.
  User: 23827
  Date: 2019/9/25
  Time: 21:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>预约的服务订单</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../plugins/layui/css/layui.css" media="all">

    <!-- 引入bootstrap框架的样式文件 -->
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.css" type="text/css">
    <!-- 引入H+框架的样式文件 -->
    <link href="../plugins/Hplus-v.4.1.0/css/style.css?v=4.1.0" rel="stylesheet">

    <link rel="stylesheet" href="../css/order/reservedServiceOrder.css" type="text/css">

</head>

<body>

<!--响应式导航-->
<%@ include file="../common/nav.jsp"%>

<ul class="layui-nav" lay-filter="">

    <li class="layui-nav-item first-nav"><a href="${path}/demand/release" style="text-decoration: none">发布的需求订单</a></li>
    <li class="layui-nav-item "><a href="${path}/demand/reserved" style="text-decoration: none">预约的服务订单</a></li>
</ul>

<div class="layui-tab">
    <ul class="layui-tab-title">
        <li class="layui-this" id="all">全部</li>
        <li>待付款</li>
        <li>已付款</li>
    </ul>
    <div class="layui-tab-content">
        <p class="p1">预约的服务订单</p>
        <div class="layui-tab-item layui-show">
            <div class="table1">
                <table class="table">
                    <thead>
                    <tr class="active">
                        <th>订单编号</th>
                        <th>订单名称</th>
                        <th>服务费用</th>
                        <th>服务时间</th>
                        <th>交易状态</th>
                        <th>服务状态</th>
                        <th></th>
                    </tr>
                    </thead>
                    <c:forEach items="${serviceOrderVoList}" var="sov">
                        <c:if test="${sov.status != 0}">
                    <tbody>
                    <tr class="default">
                        <td>${sov.orderNumber}</td>
                        <td>${sov.title}</td>
                        <td>${sov.total}</td>
                        <td>${dtime}</td>
                        <c:if test="${sov.status == 1}">
                        <td>待付款</td>
                        </c:if>

                        <c:if test="${sov.status == 2}">
                            <td>已完成</td>
                        </c:if>
                        <c:if test="${sov.status == 1}">
                        <td><button type="button" class="btn btn-primary" id="button-2" style="background-color: #00A779;border: 0px"><a href="${path}/demand/del?id=${sov.id}" style="color: white;text-decoration: none">取消预约</a></button></td>
                        </c:if>
                        <c:if test="${sov.status == 2}">
                            <td><button type="button" class="btn btn-primary" id="button-2" style="border: 0px"><a href="${path}/demand/del?id=${sov.id}" style="color: white;text-decoration: none">删除订单</a></button></td>
                        </c:if>
                    </tr>

                    </tbody>
                        </c:if>
                    </c:forEach>
                </table>
            </div>
        </div>

        <div class="layui-tab-item">
            <div class="table1">
                <table class="table">
                    <thead>
                    <tr class="active">
                        <%--<th></th>--%>
                        <th>订单编号</th>
                        <th>订单名称</th>
                        <th>服务费用</th>
                        <th>服务时间</th>
                        <th>服务状态</th>
                        <th>交易状态</th>
                        <th></th>

                    </tr>
                    </thead>
                    <from action="/pay/pays" method="get">
                        <c:forEach items="${serviceOrderVoList}" var="sov">
                            <c:if test="${sov.status == 1}">
                                <tbody>
                                <tr class="default">
                                        <%--<td><input type="checkbox"></td>--%>
                                    <td id="out_trade_no">${sov.orderNumber}</td>
                                    <td id="subject">${sov.title}</td>
                                    <td id="total_amount">${sov.total}</td>
                                            <td>${dtime}</td>
                                    <td><button type="button" class="btn btn-primary" id="button-2" style="background-color: #00A779;border: 0px"><a href="${path}/demand/del?id=${sov.id}" style="color: white;text-decoration: none">取消预约</a></button></td>
                                    <td><button type="submit" class="btn btn-primary" style="background-color: #FF910E;border:0px" id="cost"><a href="${path}/demand/cost?id=${sov.id}" style="text-decoration: none;color: white">立即支付</a></button></td>
                                        <%--<td><button type="button" class="btn btn-primary" id="button-2">取消预约</button></td>--%>
                                </tr>
                                </tbody>
                            </c:if>
                        </c:forEach>
                    </from>
                </table>
            </div>
        </div>

        <div class="layui-tab-item">
            <div class="table1">
                <table class="table">
                    <thead>
                    <tr class="active">
                        <th>订单编号</th>
                        <th>订单名称</th>
                        <th>服务费用</th>
                        <th>服务时间</th>
                        <th>交易状态</th>
                        <th>服务状态</th>
                        <th></th>
                    </tr>
                    </thead>
                    <c:forEach items="${serviceOrderVoList}" var="sov">
                        <c:if test="${sov.status == 2}">
                            <tbody>
                            <tr class="default">
                                <td>${sov.orderNumber}</td>
                                <td>${sov.title}</td>
                                <td>${sov.total}</td>
                                <td>${dtime}</td>
                                <td>已完成</td>
                                <td><button type="button" class="btn btn-primary" id="button-2" style="border: 0px"><a href="${path}/demand/del?id=${sov.id}" style="color: white;text-decoration: none">删除订单</a></button></td>
                            </tr>

                            </tbody>
                        </c:if>
                    </c:forEach>
                </table>
            </div>
        </div>
    </div>
</div>

<%@ include file="../common/footer.jsp"%>

<script src="../plugins/layui/layui.all.js" charset="utf-8"></script>

<!-- bootstrap中的js插件依赖于jquery框架,所以必须先引入jquery的js文件 -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!--引入bootstrap的js文件-->
<script src="../plugins/bootstrap/js/bootstrap.js"></script>
<script>
    $(document).ready(function () {
        dropdownOpen();//调用
    });
    /**
     * 鼠标划过就展开子菜单，免得需要点击才能展开
     */
    function dropdownOpen() {

        var $dropdownLi = $('li.dropdown');

        $dropdownLi.mouseover(function () {
            $(this).addClass('open');
        }).mouseout(function () {
            $(this).removeClass('open');
        });
    }
</script>



<script>
    layui.use('element', function () {
        var $ = layui.jquery
            , element = layui.element;

    });
</script>


<script>
//    $("#createtime").val(new Date(data.createtime).Format("yyyy-MM-dd hh:mm:ss"));
</script>



</body>

</html>
